<template>
  <div>
    <van-nav-bar title="乘车记录" left-text="返回" left-arrow @click-left="back" />
    <ul>
      <li v-for="item,index in list" :key="index">
      <p>乘坐线路：{{item.lineId}}号线</p>
      <p>乘坐站点：{{item.start}} → {{item.stop}}</p>
      <p>乘坐时间：{{item.onTime}} → {{item.offTime}}</p>
      <p>乘坐费用：{{item.price}}元</p>
      </li>
    </ul>
  </div>
</template>

<script>
import mixin from  "@/mixin/flag";
import {recorddata} from "./Service"
export default {
  data(){
    return{
      list:[{
        lineId: 33,
        start: "军事博物馆",
        stop: "木樨地",
        price: 3,
        onTime: "2021-05-09 20:02:02",
        offTime: "2021-05-09 20:05:23",
      }]
    }
  },
    mixins:[mixin],
    methods:{
        back(){
            this.$router.go(-1);
        },
    },
    async created(){
        let res = await recorddata();
        console.log(res);
    }
}
</script>

<style lang="scss" scoped>
ul{
  padding:20px;
  li{
    border: 1px solid #666;
    padding:10px;
    border-radius: 10px;
    font-size: 16px;
    p{
      line-height: 30px;
    }
  }
}

</style>